﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RssSiteInput.ascx.cs" Inherits="admin_webparts_Plug_ins_RssNews_RssSiteInput" %>
<%@ Import Namespace="NTTHAO.Web.BL.Rss" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<script type="text/javascript">
function doSubmit() {
    var txtName = document.getElementById("<%=this.txtName.ClientID %>");
    var txtURL = document.getElementById("<%=this.txtURL.ClientID %>");
    var errorMessage = "";
    
    errorMessage = CheckFieldString("noblank", txtName, 'Vui lòng nhập tên liên kết RSS');
    if(errorMessage != "")
    {
        alert(errorMessage);
        txtName.select();
        txtName.focus();
        return false;
    }
    
    errorMessage = CheckFieldString("URL", txtURL, 'Vui lòng nhập chính xác liên kết RSS');
    if(errorMessage != "")
    {
        alert(errorMessage);
        txtURL.select();
        txtURL.focus();
        return false;
    }
    
    return true;
}
</script>
<div class="tip">
	<h2 style="padding-top: 2px;">Nhập thông tin website cung cấp RSS</h2>
</div>
<form id="frmInput" runat="server" onsubmit="return doSubmit();">
<%
    string bUrl = "?type=" + Request.QueryString["type"] + "&name=" + Request.QueryString["name"] + "&item=" + Request.QueryString["item"] + (Request.QueryString["site"] == null ? "" : "&site=" + Request.QueryString["site"]);
    bool isAdmin = Context.User.Identity.Name.Equals("admin", StringComparison.OrdinalIgnoreCase);
%>
<div style="text-align: left;">
    <span id="spSave" class="yui-button yui-link-button yuibtn yuibtn-icon btnsave"><span class="first-child"><asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" /></span></span>
    <span id="spCancel1" class="yui-button yui-link-button yuibtn yuibtn-icon btncancel"><span class="first-child"><a href="<%=bUrl %>"><%=LanguageUtility.GetLanguageText("CANCEL", Session)%></a></span></span>
    <script type="text/javascript">
        YAHOO.util.Event.onContentReady("spSave", function () {
            var spSave = new YAHOO.widget.Button("spSave");
        });
        YAHOO.util.Event.onContentReady("spCancel1", function () {
            var spCancel1 = new YAHOO.widget.Button("spCancel1");
        });
    </script>
</div>
<table cellspacing="0" cellpadding="3" border="1" class="grid" style="margin: 10px auto;">
    <tr class="even">
        <td align="right"><%=LanguageUtility.GetLanguageText("NAME", Session)%>:</td>
        <td><asp:TextBox ID="txtName" runat="server" Width="400px"></asp:TextBox></td>
    </tr>
    <tr class="odd">
        <td align="right">Domain:</td>
        <td><asp:TextBox ID="txtURL" runat="server" Width="400px" Text="#"></asp:TextBox></td>
    </tr>
    <tr class="even">
        <td align="right">Culture:</td>
        <td>
            <asp:DropDownList ID="cmbCulture" runat="server" Width="404px">
                <asp:ListItem Text="English" Value="en-US"></asp:ListItem>
                <asp:ListItem Text="Tiếng Việt" Value="vi"></asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr class="odd">
        <td align="right">Timezone:</td>
        <td>
            <asp:DropDownList ID="cmbTimeZone" runat="server" Width="404px">
                <asp:ListItem Value="-13" Text="Auto detect"></asp:ListItem>
                <asp:ListItem Value="-12" Text="GMT-12"></asp:ListItem>
                <asp:ListItem Value="-11" Text="GMT-11"></asp:ListItem>
                <asp:ListItem Value="-10" Text="GMT-10"></asp:ListItem>
                <asp:ListItem Value="-9" Text="GMT-9"></asp:ListItem>
                <asp:ListItem Value="-8" Text="GMT-8"></asp:ListItem>
                <asp:ListItem Value="-7" Text="GMT-7"></asp:ListItem>
                <asp:ListItem Value="-6" Text="GMT-6"></asp:ListItem>
                <asp:ListItem Value="-5" Text="GMT-5"></asp:ListItem>
                <asp:ListItem Value="-4" Text="GMT-4"></asp:ListItem>
                <asp:ListItem Value="-3" Text="GMT-3"></asp:ListItem>
                <asp:ListItem Value="-2" Text="GMT-2"></asp:ListItem>
                <asp:ListItem Value="-1" Text="GMT-1"></asp:ListItem>
                <asp:ListItem Value="0" Text="GMT"></asp:ListItem>
                <asp:ListItem Value="1" Text="GMT+1"></asp:ListItem>
                <asp:ListItem Value="2" Text="GMT+2"></asp:ListItem>
                <asp:ListItem Value="3" Text="GMT+3"></asp:ListItem>
                <asp:ListItem Value="4" Text="GMT+4"></asp:ListItem>
                <asp:ListItem Value="5" Text="GMT+5"></asp:ListItem>
                <asp:ListItem Value="6" Text="GMT+6"></asp:ListItem>
                <asp:ListItem Value="7" Text="GMT+7"></asp:ListItem>
                <asp:ListItem Value="8" Text="GMT+8"></asp:ListItem>
                <asp:ListItem Value="9" Text="GMT+9"></asp:ListItem>
                <asp:ListItem Value="10" Text="GMT+10"></asp:ListItem>
                <asp:ListItem Value="11" Text="GMT+11"></asp:ListItem>
                <asp:ListItem Value="12" Text="GMT+12"></asp:ListItem>
                <asp:ListItem Value="13" Text="GMT+13"></asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr class="even">
        <td align="right">Description:</td>
        <td>
            <asp:CheckBox ID="chkDescEncoded" Text="Html encoded" runat="server" />
        </td>
    </tr>
    <tr class="odd">
        <td align="right">Shortcus Icon:</td>
        <td><asp:TextBox ID="txtShortcus" runat="server" Width="400px" Text=""></asp:TextBox></td>
    </tr>
    <tr class="even">
        <td align="right"><%=LanguageUtility.GetLanguageText("ACTIVE", Session)%>:</td>
        <td><asp:CheckBox ID="chkActive" runat="server" Text="Active" Checked="true" /></td>
    </tr>
</table>
<div style="text-align: left;">
    <span id="spSave2" class="yui-button yui-link-button yuibtn yuibtn-icon btnsave"><span class="first-child"><asp:Button ID="btnSave2" runat="server" OnClick="btnSave_Click" Text="Save" /></span></span>
    <span id="spCancel2" class="yui-button yui-link-button yuibtn yuibtn-icon btncancel"><span class="first-child"><a href="<%=bUrl %>"><%=LanguageUtility.GetLanguageText("CANCEL", Session)%></a></span></span>
<script type="text/javascript">
    YAHOO.util.Event.onContentReady("spSave2", function () {
        var spSave2 = new YAHOO.widget.Button("spSave2");
    });
    YAHOO.util.Event.onContentReady("spCancel2", function () {
        var spCancel2 = new YAHOO.widget.Button("spCancel2");
    });
    YAHOO.util.Event.onDOMReady(function() {
        document.getElementById('<%=txtName.ClientID %>').focus();
    });
</script>
</div>
</form>